#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define OP_BR	'<'
#define CL_BR	'>'

void
remove_tags(char *p)
{
	char *next, *end_of_tag;

	if (next = strchr(p, OP_BR)) {
		remove_tags(next + 1);

		if (end_of_tag = strchr(next, CL_BR))
			while (*end_of_tag)
				*next++ = *(++end_of_tag);
	}
}

int
main(int argc, char **argv)
{
	char line[10003];

	(void) fgets(line, 10003, stdin);
	remove_tags(line);
	printf("%s", line);

	return 0;
}
